package util;

import java.io.BufferedReader;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

public class DBWrite {

	/**
	 * @param args
	 * @throws IOException
	 */
	public static void main(String[] args) throws IOException {
		String path = "D:/Backup/hz/hz";
		InputStreamReader isr=new InputStreamReader(new FileInputStream(path), "gb2312");
		// FileInputStream is=new FileInputStream(path);
		// InputStreamReader isr=new InputStreamReader(is);
		BufferedReader bsr = new BufferedReader(isr);
		String tempLine = "";
		int i = 0;
		while (tempLine != null) {
			tempLine = bsr.readLine();
			System.out.println(tempLine);
			i++;
			if (i > 20) {
				tempLine = null;
			}
		}
		System.out.println(bsr.readLine());
	}

}
